<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
{{assign var="title" value=$title|default:'学生项目管理'}}
{{assign var="app" value='info'}}
{{assign var="act" value='index'}}
{{assign var="table" value='datas'}}
{{assign var="td" value='11'}}
<title>{{$title}}管理 - {{'admin|admin_site_name'|C|default:'后台管理'}}</title>
{{include file="include/base.html"}}
{{include file="{{$smarty.const.PLUG}}chosen/chosen.html"}}
{{include file="{{$smarty.const.PLUG}}drag/drag.html"}}
</head>
<body>

{{include file="include/sidebar.html"}}

<div class="body_right">
	<div id="content">
	
	<div class="search">
	<form action="index.php" name='search' class="router" method="get">
		<input type="hidden" name="app" value="{{$app}}"/>
		<input type="hidden" name="table" value="{{$smarty.get.table}}"/>
		<ul class="bread">
			<li class="floatr">
			</li>
<!-- 			<li>
				id：<input type="text" class="input-mini" name="id" value="{{$smarty.get.id}}" />
			</li>
			<li>
				姓名：<input class="input-small" type="text" name="title" maxlength="50" value="{{$smarty.get.title}}" />
			</li> -->
			{{if $smarty.session.role_id  == '1'}}
			<li>
				院系：
				<select name="college" id="college" class="chosen" style="min-width:100px">
					<option value="">全部</option>
					{{foreach from=$result.college item=college key=key}}
					<option value="{{$key}}" {{if $key == $smarty.get.college}} selected="selected" {{/if}}>{{$college.title}}</option>
					{{/foreach}}
				</select>
			</li>
			{{/if}}
			<li>
				<button type="submit" class="search btn btn-success"><i class="icon-search"></i>搜索</button>
				<a href="index.php?app={{$app}}&act={{$act}}{{if $smarty.get.table}}&table={{$smarty.get.table}}{{/if}}" class="a">清除</a>
			</li>
			<li style="float:right">
				<a href="index.php?app=cat&item=college&iframe=true" class="btn btn-info iframe">学院-专业管理</a>
			</li>
		</ul>
	</form>
	</div>

	<form name='form' action="index.php?app={{$app}}" method="post">
	<input type="hidden" name="app" value="{{$app}}"/>
	<input type="hidden" name="act" value=""/>
	<input type="hidden" name="table" value="{{$table}}"/>
	<table class="table table-bordered tablest drags saveorder" date="{{'table='|cat:$table|cat:'&field=ordering'|encode}}" >
		<tr class="thead">
			<td colspan="{{$td}}">
				<div class="floatr">
					<!-- <a class="btn" href="javascript:" onclick="export_excel();"><i class="icon-plus"></i>excel导出</a> -->
					<a class="btn btn-info" href="javascript:" onclick="excel();"><i class="icon-plus icon-white"></i>excel导出</a>
				</div>
				◆ {{if !$smarty.get.item}}
				{{$title}}管理 －>
				{{/if}}
				{{$title}}列表
			</td>
		</tr>
		{{if !$result.data}}
		<tr class="noline"><td colspan="{{$td}}" class="result_empty"></td></tr>
		{{else}}
		<tr class="ttitle">
			<th width="20"><label><input class="check_all" type="checkbox"/></label></th>
			<th width="35">ID</th>
			<!--<th width="">学生姓名</th>-->
			<th width="150">所属学院</th>
			<th width="">创业项目</th>
			<th width="">指导老师</th>
			<th width="">院系审核</th>
			<th width="">cxcyxy审核</th>
			<th width="150">最近编辑时间</th>
			<!-- <th width="150">申请时间</th> -->
			<!--<th width="150">联系方式</th>-->
			<th width="100">操作</th>
		</tr>
		<tbody>
			{{foreach from=$result.data item=val key=key}}
			<tr class="drag">
				{{*全选*}}<td><label><input name="check_id[]" class="check_id" value="{{$val.id}}" type="checkbox"/></label></td>
				{{*ID*}}<td>{{$val.id}}<input name="ids[]" value="{{$val.id}}" type="hidden"/></td>
				<!--{{*学生姓名*}}<td><a href="index.php?app={{$smarty.get.app}}&act=modify&type=0&iframe=true&id={{$val.userid}}" class="iframe a">{{$val.user.username}}</a></td>-->
				{{*所属学院*}}<td>{{$val.college}}</td>
				{{*创业项目*}}<td><a href="index.php?app={{$app}}&act=modify&id={{$val.id}}&table={{$smarty.get.table}}&iframe=true" class="a iframe">{{$val.project}}</a></td>
				{{*指导老师*}}<td>{{if $val.members.teacher.username}}{{$val.members.teacher.username}}{{else}}暂无指导老师{{/if}}</td>
				{{*结果*}}<td>{{if $val.auditing_1 == '0'}}未审核{{elseif $val.auditing_1 == '1'}}审核通过{{elseif $val.auditing_1 == '2'}}审核不通过{{/if}}</td>
				{{*结果2*}}<td>{{if $val.auditing_2 == '0'}}未审核{{elseif $val.auditing_2 == '1'}}审核通过{{elseif $val.auditing_2 == '2'}}审核不通过{{/if}}</td>
				{{*最近编辑时间*}}<td>{{if $val.editdate}}{{$val.editdate}}{{else}}首次添加无编辑时间{{/if}}</td>
				<!-- {{*编辑时间*}}<td>{{$val.adddate}}</td> -->
				<!--{{*联系方式*}}<td>{{$val.user.mobile}}</td>-->
				<td>
					<a href="index.php?app={{$app}}&act=modify&id={{$val.id}}&table={{$smarty.get.table}}&iframe=true" class="btn iframe"><i class="icon-edit"></i>详情查看</a>
				</td>
			</tr>
			{{/foreach}}
			<tr class="thead">
			  <td colspan="{{$td}}">
				{{include file="include/page.html"}}
			  </td>
			</tr>
		</tbody>
		{{/if}}
	</table>
	</form>
</div>
</div>
<script type="text/javascript">
	function excel(){
		var check_id = $('.check_id:checked');
		if(check_id.length==0) { ui.alert("至少选择一条数据!"); return false; }
		var chk_value = []; 
		check_id.each(function(){ 
			chk_value.push($(this).val()); 
		}); 
		var url = "index.php?app=info&act=excel&table={{$smarty.get.table}}&check_id="+chk_value; 
		document.location.href = url;
	}
</script>
</body>
</html>